/*
 * @Author: 陈德基
 * @Date: 2021-05-19 11:58:28
 * @LastEditTime: 2021-09-16 11:15:10
 * @Description: 
 * @FilePath: /green_donkey_flutter/lib/util/logger_util.dart
 * 联系方式：
 * wx: melody_2009
 * qq: 7815171323 
 */
import 'package:logger/logger.dart';

class LoggerUtil {
  static var logger = Logger(
      printer: PrettyPrinter(
          methodCount: 2, // number of method calls to be displayed
          errorMethodCount:
              8, // number of method calls if stacktrace is provided
          lineLength: 120, // width of the output
          colors: true, // Colorful log messages
          printEmojis: true, // Print an emoji for each log message
          printTime: false // Should each log print contain a timestamp
          ));
  static void write(String text, {bool isError = false}) {
    isError ? logger.e(text) : logger.i(text);
  }
}
